package com.cskaoyan.service;

import com.cskaoyan.annotation.CountTime;
import com.cskaoyan.bean.User;
import org.springframework.stereotype.Service;

/**
 * @author stone
 * @date 2022/05/26 11:33
 */
@Service
public class UserServiceImpl implements UserService{

    @CountTime
    @Override
    public void sayHello(String name) {
        System.out.println("hello " + name);

        try {
            Thread.sleep(1000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

    @Override
    public User sayHello() {
        System.out.println("hello2");
        return null;
    }

    @CountTime
    @Override
    public User sayHello(User user) {
        System.out.println("hello3");
        return null;
    }

}
